1. Field of the Invention
The invention relates to a storage apparatus and a method of managing data in the storage apparatus, and particularly relates to a backup technique for cache data in the storage apparatus.
2. Description of Related Art
With the viewpoint of improving system performance, etc., a storage apparatus (or storage sub-system) is generally equipped with cache memory. The cache memory is typically composed of volatile memory such as DRAM. A large-scale storage apparatus equipped with high-capacity hard disk drives (HDD) is provided with high-capacity cache memory in the order of from several to several tens of gigabytes. During operation, the storage apparatus responds to an I/O request to a host apparatus while caching application data in the cache memory.
Also, in order to further improve system performance, a storage apparatus has been proposed which includes a “cache-resident function” for caching the entire logical volume created for hard disk drives in cache memory.
In such a storage apparatus, in order to prevent large amounts of data in cache memory from disappearing, upon an unexpected power shutdown, data in the cache memory is destaged (backed up) to hard disk drives while power supply is temporarily supplied from a battery as a secondary power supply to maintain the operation state of the apparatus.
In addition, increased capacity and reduction in cost of non-volatile memory such as flash memory have been promoted recently, and application of non-volatile memory has been expanding rapidly. For example, JP06-236241 A discloses a hard disk device in which part of cache memory is composed of flash memory. More specifically, in JP06-236241 A, data in a frequently accessed area in a hard disk is located in flash memory, and this eliminates the movement of a disk head as much as possible to enhance data access efficiency, and also prevents cache data from disappearing due to a power shutdown.
Further, JP10-154101 A discloses a data storage system in which a semiconductor disk apparatus composed of EEPROM functions as cache memory to a hard disk device. Specifically, in JP10-154101 A, necessary information for activating an operating system or a frequently-used application program is stored in the semiconductor disk apparatus, and this enables the cache function to be exhibited effectively even immediately after the power-on.
In a large-scale storage apparatus, large amounts of data exist in cache memory while not being subjected to destaging to hard disk drives during operation. Therefore, it is imperative to take measures to prevent such data from disappearing in an emergency such as a power shutdown.
A conventional battery-employing backup method in an emergency has tended to prove costly, as a storage apparatus needs to be provided with a considerable number of relatively expensive batteries in order to maintain its driving of hard disk drives. Therefore, keeping power consumption low as much as possible leads to longer driving with a smaller number of batteries. However, as long as a hard disk drive is set as a data backup destination, there is a limit to effective reduction in power consumption.
Further, if backup is conducted for all the data in cache memory in an emergency such as a power shutdown, the load on a processor as a result of backup processing will be heavy, and backup time is required. Thus, it has been difficult to keep battery power consumption low.
Moreover, even when part of cache memory is composed of non-volatile memory, the data stored in volatile memory still has a problem in that the data will be lost without being subjected to backup in an emergency such as a power shutdown. However, if the data stored in volatile cache memory is backed up to a hard disk drive in an emergency such as a power shutdown, this eventually results in the power consumption problem in the conventional battery backup method. Despite this, backup for cache data in volatile memory to non-volatile memory used as cache memory has not been proposed.
Furthermore, when non-volatile cache memory is used as backup memory in an emergency such as a power shutdown, when data in volatile cache memory is merely transferred to the non-volatile cache memory, data that does not originally need to be subjected to backup, such as clean data, is transferred also, which means effective backup processing cannot be realized. There is also the possibility that as of yet non-destaged data cached in the non-volatile cache memory is overwritten with the transferred data.
In view of the above, the invention has an objective of data held in volatile cache memory being efficiently and reliably stored under a second power supply even when an emergency backup request due to an unexpected power shutdown or similar emerges, and consequently has an objective of reducing the power consumption of the secondary power supply as much as possible.